
import json
 
# Data to be written
dictionary = {
    "version": "0.1",
    "self_ip": "192.168.1.10",
    "user_name": "ll",
    "phonenumber": "9976770500"
}
 
# Serializing json
json_object = json.dumps(dictionary, indent=4)
 
# Writing to sample.json
with open("sample.json", "w") as outfile:
    outfile.write(json_object)

